<template>
    <div class="right-aside">
      <el-card>
        <el-row>
          <el-col>
            倒计时
          </el-col>
        </el-row>
        <el-row>
          <el-col>
              <h2>{{leaveTime}}</h2>
          </el-col>
        </el-row>
      </el-card>
      <el-card style="margin-top: 300px">
        <el-row>
          <el-col>
            <el-button @click="preQues" type="text">
              上一题
            </el-button>
          </el-col>
        </el-row>
        <el-divider />
        <el-row>
          <el-col>
            <el-button @click="nextQues" type="text">
              下一题
            </el-button>
          </el-col>
        </el-row>
      </el-card>

      <el-row style="margin-top: 50px">
        <el-col>
          <el-button type="primary" class="full" @click="submitContest">提交</el-button>
        </el-col>
      </el-row>
    </div>
</template>

<script>
export default {
  props: {
    leaveTime: {
      type: String,
      required: true
    }
  },
  methods: {
    nextQues () {
      this.$bus.$emit('next-ques')
    },
    preQues () {
      this.$bus.$emit('pre-ques')
    },
    submitContest () {
      this.$emit('end-contest')
    }
  }
}
</script>

<style scoped lang="less">

</style>
